!Moyenne de plusieurs données de "a2ap-2b-subrun" (si un run a planté) Attention: seulement -2.5 à 2.5
!Copier dans le répertoire d:
!20M05p3mu-RunRIP
!20M05p0mu-RunRIP
!40M05pm1.5mu-RunRIP
!20M05p3mu
!20M05p0mu
!40M05pm1.5mu
!Sortie: écrasement dans les répertoires non-rip
!Attention:
!1) produit des erreurs si il n'y a pas assez de points (des trous).
!2) ne recolle pas le fichier d'origine (1) pour \mu=3 et \mu=-1.5 (pas assez de points)
!3) entrer les nb iterations des fichiers RIP et non-RIP

program a2ap2bdata
implicit none
double precision, dimension(1:2,1:126,1:10) :: mu3rip,mu0rip,mu3,mu0,mum15rip,mum15 !1: valeur x, 2: valeur y
integer :: mu0it,mu3it,mum15it !nombre d'iterations des nouveaux fichiers
integer :: i,j
integer, parameter :: mu0ripit = 93355
integer, parameter :: mu3ripit = 162839
integer, parameter :: mum15ripit = 56489

!====================
!Nombre d'iterations des nouveaux fichiers
!====================

mu0it = 72752
mu3it = 125665
mum15it = 28529

!====================
!Lecture des fichiers
!====================

!*** 20M05p0mu-RunRIP

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-1h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,1),mu0rip(2,1,1)
	if (mu0rip(1,1,1) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,1),mu0rip(2,i,1)	
		end do
		j=1
	end if
end do

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-2h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,2),mu0rip(2,1,2)
	if (mu0rip(1,1,2) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,2),mu0rip(2,i,2)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,3),mu0rip(2,1,3)
	if (mu0rip(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,3),mu0rip(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,4),mu0rip(2,1,4)
	if (mu0rip(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,4),mu0rip(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,5),mu0rip(2,1,5)
	if (mu0rip(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,5),mu0rip(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,6),mu0rip(2,1,6)
	if (mu0rip(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,6),mu0rip(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,7),mu0rip(2,1,7)
	if (mu0rip(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,7),mu0rip(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,8),mu0rip(2,1,8)
	if (mu0rip(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,8),mu0rip(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,9),mu0rip(2,1,9)
	if (mu0rip(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,9),mu0rip(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu-RunRIP/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mu0rip(1,1,10),mu0rip(2,1,10)
	if (mu0rip(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mu0rip(1,i,10),mu0rip(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!*** 20M05p0mu-Run

open(unit=1,file="20M05p0mu/a2ap-2-1h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,1),mu0(2,1,1)
	if (mu0(1,1,1) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,1),mu0(2,i,1)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-2h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,2),mu0(2,1,2)
	if (mu0(1,1,2) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,2),mu0(2,i,2)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,3),mu0(2,1,3)
	if (mu0(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,3),mu0(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,4),mu0(2,1,4)
	if (mu0(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,4),mu0(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,5),mu0(2,1,5)
	if (mu0(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,5),mu0(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,6),mu0(2,1,6)
	if (mu0(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,6),mu0(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,7),mu0(2,1,7)
	if (mu0(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,7),mu0(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,8),mu0(2,1,8)
	if (mu0(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,8),mu0(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,9),mu0(2,1,9)
	if (mu0(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,9),mu0(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mu0(1,1,10),mu0(2,1,10)
	if (mu0(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mu0(1,i,10),mu0(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!*** 20M05p3mu-RunRIP
!---pas de moyenne sur le 1er/2eme pas de la distribution \mu = 3 car ne vas pas jusqu'à -2.5

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-2h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,2),mu3(2,1,2)
	if (mu3(1,1,2) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,2),mu3(2,i,2)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,3),mu3rip(2,1,3)
	if (mu3rip(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,3),mu3rip(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,4),mu3rip(2,1,4)
	if (mu3rip(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,4),mu3rip(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,5),mu3rip(2,1,5)
	if (mu3rip(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,5),mu3rip(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,6),mu3rip(2,1,6)
	if (mu3rip(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,6),mu3rip(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,7),mu3rip(2,1,7)
	if (mu3rip(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,7),mu3rip(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,8),mu3rip(2,1,8)
	if (mu3rip(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,8),mu3rip(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,9),mu3rip(2,1,9)
	if (mu3rip(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,9),mu3rip(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu-RunRIP/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mu3rip(1,1,10),mu3rip(2,1,10)
	if (mu3rip(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mu3rip(1,i,10),mu3rip(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!*** 20M05p3mu

open(unit=1,file="20M05p3mu/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,3),mu3(2,1,3)
	if (mu3(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,3),mu3(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,4),mu3(2,1,4)
	if (mu3(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,4),mu3(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,5),mu3(2,1,5)
	if (mu3(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,5),mu3(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,6),mu3(2,1,6)
	if (mu3(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,6),mu3(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,7),mu3(2,1,7)
	if (mu3(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,7),mu3(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,8),mu3(2,1,8)
	if (mu3(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,8),mu3(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,9),mu3(2,1,9)
	if (mu3(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,9),mu3(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mu3(1,1,10),mu3(2,1,10)
	if (mu3(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mu3(1,i,10),mu3(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!*** 40M05pm1.5mu-RunRIP
!----- 40M. Pas de moyenne sur le premier.

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-2h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,2),mum15rip(2,1,2)
	if (mum15rip(1,1,2) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,2),mum15rip(2,i,2)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,3),mum15rip(2,1,3)
	if (mum15rip(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,3),mum15rip(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,4),mum15rip(2,1,4)
	if (mum15rip(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,4),mum15rip(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,5),mum15rip(2,1,5)
	if (mum15rip(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,5),mum15rip(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,6),mum15rip(2,1,6)
	if (mum15rip(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,6),mum15rip(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,7),mum15rip(2,1,7)
	if (mum15rip(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,7),mum15rip(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,8),mum15rip(2,1,8)
	if (mum15rip(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,8),mum15rip(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,9),mum15rip(2,1,9)
	if (mum15rip(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,9),mum15rip(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu-RunRIP/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mum15rip(1,1,10),mum15rip(2,1,10)
	if (mum15rip(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mum15rip(1,i,10),mum15rip(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!*** 40M05pm1.5mu

open(unit=1,file="40M05pm1.5mu/a2ap-2-2h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,2),mum15(2,1,2)
	if (mum15(1,1,2) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,2),mum15(2,i,2)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-3h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,3),mum15(2,1,3)
	if (mum15(1,1,3) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,3),mum15(2,i,3)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-4h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,4),mum15(2,1,4)
	if (mum15(1,1,4) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,4),mum15(2,i,4)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-5h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,5),mum15(2,1,5)
	if (mum15(1,1,5) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,5),mum15(2,i,5)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-6h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,6),mum15(2,1,6)
	if (mum15(1,1,6) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,6),mum15(2,i,6)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-7h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,7),mum15(2,1,7)
	if (mum15(1,1,7) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,7),mum15(2,i,7)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-8h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,8),mum15(2,1,8)
	if (mum15(1,1,8) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,8),mum15(2,i,8)	
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-9h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,9),mum15(2,1,9)
	if (mum15(1,1,9) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,9),mum15(2,i,9)
		end do
		j=1
	end if
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-10h.txt")
j=0
do while (j==0)
	read(1,*) mum15(1,1,10),mum15(2,1,10)
	if (mum15(1,1,10) > -2.501d0) then
		do i=2,126
			read(1,*) mum15(1,i,10),mum15(2,i,10)
		end do
		j=1
	end if
end do
close(1)

!====================
!Moyenne
!====================

do j=1,10
	do i=1,126
		mu0(2,i,j) = (dble(mu0it)*mu0(2,i,j) + dble(mu0ripit)*mu0rip(2,i,j))/dble(mu0it+mu0ripit)
	end do
end do

do j=2,10 !attention: j=2 peut avoir des trous si la statistique est trop petite
	do i=1,126
		mu3(2,i,j) = (dble(mu3it)*mu3(2,i,j) + dble(mu3ripit)*mu3rip(2,i,j))/dble(mu3it+mu3ripit)
	end do
end do

do j=2,10
	do i=1,126
		mum15(2,i,j) = (dble(mum15it)*mum15(2,i,j) + dble(mum15ripit)*mum15rip(2,i,j))/dble(mum15it+mum15ripit)
	end do
end do

!====================
!Sauvegarde (écrase les fichiers non-RIP)
!====================

!*** 20M05p0mu

open(unit=1,file="20M05p0mu/a2ap-2-1h.txt")
do i=1,126
	write(1,*) mu0(1,i,1),mu0(2,i,1)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-2h.txt")
do i=1,126
	write(1,*) mu0(1,i,2),mu0(2,i,2)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-3h.txt")
do i=1,126
	write(1,*) mu0(1,i,3),mu0(2,i,3)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-4h.txt")
do i=1,126
	write(1,*) mu0(1,i,4),mu0(2,i,4)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-5h.txt")
do i=1,126
	write(1,*) mu0(1,i,5),mu0(2,i,5)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-6h.txt")
do i=1,126
	write(1,*) mu0(1,i,6),mu0(2,i,6)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-7h.txt")
do i=1,126
	write(1,*) mu0(1,i,7),mu0(2,i,7)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-8h.txt")
do i=1,126
	write(1,*) mu0(1,i,8),mu0(2,i,8)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-9h.txt")
do i=1,126
	write(1,*) mu0(1,i,9),mu0(2,i,9)
end do
close(1)

open(unit=1,file="20M05p0mu/a2ap-2-10h.txt")
do i=1,126
	write(1,*) mu0(1,i,10),mu0(2,i,10)
end do
close(1)

!*** 20M05p3mu

open(unit=1,file="20M05p3mu/a2ap-2-2h.txt")
do i=1,126
	write(1,*) mu3(1,i,2),mu3(2,i,2)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-3h.txt")
do i=1,126
	write(1,*) mu3(1,i,3),mu3(2,i,3)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-4h.txt")
do i=1,126
	write(1,*) mu3(1,i,4),mu3(2,i,4)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-5h.txt")
do i=1,126
	write(1,*) mu3(1,i,5),mu3(2,i,5)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-6h.txt")
do i=1,126
	write(1,*) mu3(1,i,6),mu3(2,i,6)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-7h.txt")
do i=1,126
	write(1,*) mu3(1,i,7),mu3(2,i,7)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-8h.txt")
do i=1,126
	write(1,*) mu3(1,i,8),mu3(2,i,8)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-9h.txt")
do i=1,126
	write(1,*) mu3(1,i,9),mu3(2,i,9)
end do
close(1)

open(unit=1,file="20M05p3mu/a2ap-2-10h.txt")
do i=1,126
	write(1,*) mu3(1,i,10),mu3(2,i,10)
end do
close(1)

!*** 40M05pm1.5mu

open(unit=1,file="40M05pm1.5mu/a2ap-2-2h.txt")
do i=1,126
	write(1,*) mum15(1,i,2),mum15(2,i,2)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-3h.txt")
do i=1,126
	write(1,*) mum15(1,i,3),mum15(2,i,3)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-4h.txt")
do i=1,126
	write(1,*) mum15(1,i,4),mum15(2,i,4)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-5h.txt")
do i=1,126
	write(1,*) mum15(1,i,5),mum15(2,i,5)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-6h.txt")
do i=1,126
	write(1,*) mum15(1,i,6),mum15(2,i,6)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-7h.txt")
do i=1,126
	write(1,*) mum15(1,i,7),mum15(2,i,7)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-8h.txt")
do i=1,126
	write(1,*) mum15(1,i,8),mum15(2,i,8)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-9h.txt")
do i=1,126
	write(1,*) mum15(1,i,9),mum15(2,i,9)
end do
close(1)

open(unit=1,file="40M05pm1.5mu/a2ap-2-10h.txt")
do i=1,126
	write(1,*) mum15(1,i,10),mum15(2,i,10)
end do
close(1)

write(*,*)
write(*,*) "Programme termine."
read(*,*) 
end program a2ap2bdata